As a database engineer, you frequently work with Python to perform
Cloud Operations on MySQL database. But before you can work with Python,
you first need to install and configure Pythons on your system so you can create
connections between Python MySQL. Let's look at the installation
configuration person creating this connection. The first step is download and install the most recent version of
Python from the Python.org website. Follow sites, installation instructions. Once you've installed python,
you then need to open the application, select the search icon and
access the command prompt type python - - version to identify which version
of Python is running on your machine. If Python is correctly installed
then Python three should appear in your Console. This means that you're
running Python three. There should also be several numbers after
three to indicate which version of Python three you're running. Make sure these numbers match the most
recent versions on the Python website. If you see a message that
states Python not found, then review Python installation on
the relevant document in the website. Now that you've installed Python,
you need to choose an IDE or integrated environment
to run your code on. This software that you can
use to display your code. This course uses the Jupyter
IDE to demonstrate Python. So it's probably best if you also
use the Jupyter environment. To install Juypter type python - m pip installed Jupyter. Once jupyter is installed,
type Python - m notebook. This opens a new instance of notebook for
you to use within the default browser. You can now set up your
working environment. Select the new button,
Jupyter then choose a new folder. This action generates an unnamed folder. Rename the new folder too. MySQL Python course content and then access it. You can now save your projects and
other files in this location. Now select new again and
choose Python three IPI Kernel option. This opens a new tab in which
you can enter your code. You need to connect Python
to your MySQL database. You can create the installation using
a purpose-built Python library called MySQL Connector. This library API that provides lots of
useful features for work with my SQL. MySQL Connector needs to be installed
separately using a package called pip. Pip packages included with Python
software you've just installed. Name this new notebook instance
configuring MySQL connector to install the connector,
type an exclamation mark and a pip. To call the package,
then type the install command and then type the library
which is MySQL connector. Finally, press shift and enter or
select to run and execute the code. The output of this code is that the
installation ships have now been performed and a list of libraries
have been installed. Python can now access functionalities
of all these libraries. You can import libraries in Python
by typing the import command and the name of the library and an alias for example to import MySQL connector
in a cell in your Jupyter notebook. Just type import MySQL dot
connector as connector. The imports index tells Python that
there is a library you want to import to make use of. The MySQL syntax refers to a subfolder
the hip is installed, which holds the connector the dot before the connector
is known as an access operator. It tells Python that you want to access
this connector subfolder using the dot operator. Finally, the use of R's is a method of
renaming the import using aliasing. This is like the aliasing that you
encountered in previous database courses when working with joins. Aliasing is a common practice
in Python development. You can use custom names, but best
practices to make use of common aliases the other developers are familiar with. Now that you've typed the code,
it's time to run it. If there's no output in the Console
when you run the code, then this means that the connector
has been successfully installed. You cannot communicate with your database. You should not be familiar with the
process of installing a MySQL connector to create a bridge between your Python and
MySQL environment. You also know how to install and
configure a Python environment. Great work.